import { createRouter, createWebHistory } from 'vue-router'; // 使用命名导出
import Page1 from '../components/Page1.vue';
import DeleteMovie from '../components/DeleteMovie.vue'
import UpdateMovieName from '../components/UpdateMovieName.vue'
import RankMovie from '../components/RankMovie.vue'
import Score from '../components/Score.vue'
import Scorebig from '../components/Scorebig.vue'
import InsertMovie from '../components/InsertMovie.vue'

// import Page2 from '../components/Page2.vue';

const routes = [
  { path: '/page1', component: Page1 },
  { path: '/DeleteMovie', component: DeleteMovie },
  { path: '/UpdateMovieName',component: UpdateMovieName},
  { path: '/RankMovie', component: RankMovie},
  { path: '/Score' , component: Score},
  { path: '/Scorebig' , component: Scorebig},
  { path: '/InsertMovie', component: InsertMovie},
  { path: '/', redirect: '/page1' } // 默认重定向到 Page1
];

const router = createRouter({
  history: createWebHistory(), // 使用 history 模式
  routes
});

export default router;